Integrand size = 23, antiderivative size = 91 \[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=(a-b)^2 x-\frac {(a-b)^2 \tan (e+f x)}{f}+\frac {(a-b)^2 \tan ^3(e+f x)}{3 f}+\frac {(2 a-b) b \tan ^5(e+f x)}{5 f}+\frac {b^2 \tan ^7(e+f x)}{7 f} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3751, 472, 209} \[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {b (2 a-b) \tan ^5(e+f x)}{5 f}+\frac {(a-b)^2 \tan ^3(e+f x)}{3 f}-\frac {(a-b)^2 \tan (e+f x)}{f}+x (a-b)^2+\frac {b^2 \tan ^7(e+f x)}{7 f} \]
[In]
[Out]
Rule 209
Rule 472
Rule 3751
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x^4 \left (a+b x^2\right )^2}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\text {Subst}\left (\int \left (-(a-b)^2+(a-b)^2 x^2+(2 a-b) b x^4+b^2 x^6+\frac {a^2-2 a b+b^2}{1+x^2}\right ) \, dx,x,\tan (e+f x)\right )}{f} \\ & = -\frac {(a-b)^2 \tan (e+f x)}{f}+\frac {(a-b)^2 \tan ^3(e+f x)}{3 f}+\frac {(2 a-b) b \tan ^5(e+f x)}{5 f}+\frac {b^2 \tan ^7(e+f x)}{7 f}+\frac {(a-b)^2 \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f} \\ & = (a-b)^2 x-\frac {(a-b)^2 \tan (e+f x)}{f}+\frac {(a-b)^2 \tan ^3(e+f x)}{3 f}+\frac {(2 a-b) b \tan ^5(e+f x)}{5 f}+\frac {b^2 \tan ^7(e+f x)}{7 f} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(190\) vs. \(2(91)=182\).
Time = 0.07 (sec) , antiderivative size = 190, normalized size of antiderivative = 2.09 \[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {a^2 \arctan (\tan (e+f x))}{f}-\frac {2 a b \arctan (\tan (e+f x))}{f}+\frac {b^2 \arctan (\tan (e+f x))}{f}-\frac {a^2 \tan (e+f x)}{f}+\frac {2 a b \tan (e+f x)}{f}-\frac {b^2 \tan (e+f x)}{f}+\frac {a^2 \tan ^3(e+f x)}{3 f}-\frac {2 a b \tan ^3(e+f x)}{3 f}+\frac {b^2 \tan ^3(e+f x)}{3 f}+\frac {2 a b \tan ^5(e+f x)}{5 f}-\frac {b^2 \tan ^5(e+f x)}{5 f}+\frac {b^2 \tan ^7(e+f x)}{7 f} \]
[In]
[Out]
Time = 0.08 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.08
method | result | size |
norman | \(\left (a^{2}-2 a b +b^{2}\right ) x +\frac {b^{2} \tan \left (f x +e \right )^{7}}{7 f}-\frac {\left (a^{2}-2 a b +b^{2}\right ) \tan \left (f x +e \right )}{f}+\frac {\left (a^{2}-2 a b +b^{2}\right ) \tan \left (f x +e \right )^{3}}{3 f}+\frac {\left (2 a -b \right ) b \tan \left (f x +e \right )^{5}}{5 f}\) | \(98\) |
parts | \(\frac {a^{2} \left (\frac {\tan \left (f x +e \right )^{3}}{3}-\tan \left (f x +e \right )+\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {b^{2} \left (\frac {\tan \left (f x +e \right )^{7}}{7}-\frac {\tan \left (f x +e \right )^{5}}{5}+\frac {\tan \left (f x +e \right )^{3}}{3}-\tan \left (f x +e \right )+\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {2 a b \left (\frac {\tan \left (f x +e \right )^{5}}{5}-\frac {\tan \left (f x +e \right )^{3}}{3}+\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}\) | \(131\) |
derivativedivides | \(\frac {\frac {b^{2} \tan \left (f x +e \right )^{7}}{7}+\frac {2 a b \tan \left (f x +e \right )^{5}}{5}-\frac {b^{2} \tan \left (f x +e \right )^{5}}{5}+\frac {a^{2} \tan \left (f x +e \right )^{3}}{3}-\frac {2 a b \tan \left (f x +e \right )^{3}}{3}+\frac {b^{2} \tan \left (f x +e \right )^{3}}{3}-a^{2} \tan \left (f x +e \right )+2 a b \tan \left (f x +e \right )-b^{2} \tan \left (f x +e \right )+\left (a^{2}-2 a b +b^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{f}\) | \(133\) |
default | \(\frac {\frac {b^{2} \tan \left (f x +e \right )^{7}}{7}+\frac {2 a b \tan \left (f x +e \right )^{5}}{5}-\frac {b^{2} \tan \left (f x +e \right )^{5}}{5}+\frac {a^{2} \tan \left (f x +e \right )^{3}}{3}-\frac {2 a b \tan \left (f x +e \right )^{3}}{3}+\frac {b^{2} \tan \left (f x +e \right )^{3}}{3}-a^{2} \tan \left (f x +e \right )+2 a b \tan \left (f x +e \right )-b^{2} \tan \left (f x +e \right )+\left (a^{2}-2 a b +b^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{f}\) | \(133\) |
parallelrisch | \(\frac {15 b^{2} \tan \left (f x +e \right )^{7}+42 a b \tan \left (f x +e \right )^{5}-21 b^{2} \tan \left (f x +e \right )^{5}+35 a^{2} \tan \left (f x +e \right )^{3}-70 a b \tan \left (f x +e \right )^{3}+35 b^{2} \tan \left (f x +e \right )^{3}+105 a^{2} f x -210 a b f x +105 b^{2} f x -105 a^{2} \tan \left (f x +e \right )+210 a b \tan \left (f x +e \right )-105 b^{2} \tan \left (f x +e \right )}{105 f}\) | \(135\) |
risch | \(x \,a^{2}-2 x a b +x \,b^{2}-\frac {4 i \left (105 a^{2} {\mathrm e}^{12 i \left (f x +e \right )}-315 a b \,{\mathrm e}^{12 i \left (f x +e \right )}+210 b^{2} {\mathrm e}^{12 i \left (f x +e \right )}+525 a^{2} {\mathrm e}^{10 i \left (f x +e \right )}-1260 a b \,{\mathrm e}^{10 i \left (f x +e \right )}+630 b^{2} {\mathrm e}^{10 i \left (f x +e \right )}+1120 a^{2} {\mathrm e}^{8 i \left (f x +e \right )}-2555 a b \,{\mathrm e}^{8 i \left (f x +e \right )}+1540 b^{2} {\mathrm e}^{8 i \left (f x +e \right )}+1330 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}-3080 a b \,{\mathrm e}^{6 i \left (f x +e \right )}+1540 b^{2} {\mathrm e}^{6 i \left (f x +e \right )}+945 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}-2121 a b \,{\mathrm e}^{4 i \left (f x +e \right )}+1218 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+385 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}-812 a b \,{\mathrm e}^{2 i \left (f x +e \right )}+406 b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+70 a^{2}-161 a b +88 b^{2}\right )}{105 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{7}}\) | \(297\) |
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.03 \[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {15 \, b^{2} \tan \left (f x + e\right )^{7} + 21 \, {\left (2 \, a b - b^{2}\right )} \tan \left (f x + e\right )^{5} + 35 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{3} + 105 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} f x - 105 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )}{105 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 165 vs. \(2 (71) = 142\).
Time = 0.21 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.81 \[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\begin {cases} a^{2} x + \frac {a^{2} \tan ^{3}{\left (e + f x \right )}}{3 f} - \frac {a^{2} \tan {\left (e + f x \right )}}{f} - 2 a b x + \frac {2 a b \tan ^{5}{\left (e + f x \right )}}{5 f} - \frac {2 a b \tan ^{3}{\left (e + f x \right )}}{3 f} + \frac {2 a b \tan {\left (e + f x \right )}}{f} + b^{2} x + \frac {b^{2} \tan ^{7}{\left (e + f x \right )}}{7 f} - \frac {b^{2} \tan ^{5}{\left (e + f x \right )}}{5 f} + \frac {b^{2} \tan ^{3}{\left (e + f x \right )}}{3 f} - \frac {b^{2} \tan {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right )^{2} \tan ^{4}{\left (e \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.07 \[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {15 \, b^{2} \tan \left (f x + e\right )^{7} + 21 \, {\left (2 \, a b - b^{2}\right )} \tan \left (f x + e\right )^{5} + 35 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{3} + 105 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} {\left (f x + e\right )} - 105 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )}{105 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 1579 vs. \(2 (85) = 170\).
Time = 2.52 (sec) , antiderivative size = 1579, normalized size of antiderivative = 17.35 \[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\text {Too large to display} \]
[In]
[Out]
Time = 11.76 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.40 \[ \int \tan ^4(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (e+f\,x\right )\,{\left (a-b\right )}^2}{a^2-2\,a\,b+b^2}\right )\,{\left (a-b\right )}^2}{f}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^5\,\left (\frac {2\,a\,b}{5}-\frac {b^2}{5}\right )}{f}-\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (a^2-2\,a\,b+b^2\right )}{f}+\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^7}{7\,f}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (\frac {a^2}{3}-\frac {2\,a\,b}{3}+\frac {b^2}{3}\right )}{f} \]
[In]
[Out]